<template>
  <div>
      {{this.user.uname}}
       <el-table
    :data="this.userList"
    style="width: 100%">
    <el-table-column
      label="头像"
      width="180">
        <template slot-scope="scope">
          <!-- {{'/project/html/img/'+scope.row.ujpg}} -->
            <img style="width:50px;height:90px" :src="'/project/html/img/'+scope.row.ujpg">
      </template>
    </el-table-column>
    <el-table-column
      label="用户名"
      width="180"
      prop="uname"
      >
     
    </el-table-column>
    <el-table-column label="操作">
      <template slot-scope="scope">
        <el-button
          size="mini"
          @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
        <el-button
          size="mini"
          type="danger"
          @click="handleDelete(scope.$index, scope.row)">删除</el-button>
      </template>
    </el-table-column>
  </el-table>
   <div class="block" style="margin-left: 150px">  
        <el-pagination background @current-change="handleCurrentChange"   
        :current-page.sync="currentPage3" :page-size="5"
         layout="prev, pager, next, jumper" :total="cutUser.total">
        </el-pagination>
        </div>
  </div>
</template>

<script>

export default {
   data(){
        return {
             userList:[],
             user:{},
             currentPage3:1,
             cutUser:{}
        }
    },
    methods:{
          async findAll(){
                var cutObj = await this.ajax.getSubmit("/project/users/getPage",{pageNO:this.currentPage3})
                this.userList=cutObj.records;
                this.cutUser=cutObj;
                // alert(JSON.stringify(this.userList))
        },
                handleCurrentChange(pageNO){
            // this.param.pageNO = pageNO;
            this.findAll(pageNO);
        },

     async getUser() {
    
      var cutObj = await this.ajax.getSubmit("/project/users/getUser");
      // alert(JSON.stringify(cutObj));
           
               this.user=cutObj;
             
      
      },

    
    },
     created(){
       this.getUser();
         this.findAll();
         
         

    }
}
</script>

<style>

</style>